package com.example.chat.model;

import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author pq
 * @date 2022/8/14 0:21
 * @description 用户聊天记录关联表
 * @modified
 **/
@Entity
@Data
@DynamicUpdate
@DynamicInsert
@Table(name = "user_rel_chat_record")
public class UserRelChatRecords extends BaseEntity implements Serializable {

    /**
     * 主键
     */
    @Id
    @GenericGenerator(name = "uuid", strategy = "org.hibernate.id.UUIDGenerator")
    @GeneratedValue(generator = "uuid")
    @Column(name = "id", nullable = false)
    private String id;

    /**
     * 用户id
     */
    @Column(name = "user_id", nullable = false)
    private String userId;

    /**
     * 聊天记录id
     */
    @Column(name = "chat_record_id", nullable = false)
    private String chatRecordId;


}
